<?php
	/*
	 * Application written in PHP,Javascript,Ajax,Xml
	 * Developed and produced by Viktor Karlsson in 2011
	 * Zend Studio 8 as the development platform
	 */ 

	//TODO , fix code indent in files LoginView,LoginHandler (aptana indents used now)
		

	// Linking files
	
		// Model
		require_once("Model/LoginHandler.php");
		
		// View
		require_once("View/HeaderView.php");
		require_once("View/LoginView.php");
		require_once("View/MenuView.php");
		
		// Controller
		require_once("Controller/HeaderController.php");
		require_once("Controller/LoginController.php");
		require_once("Controller/MasterController.php");
		require_once("Controller/MenuController.php");
		
		// Misc
		require_once("Misc/DatabaseConnection.php");
		require_once("Misc/Log.php");
		require_once("Misc/MessageLogistics.php");
		require_once("Misc/Settings.php");
		require_once("Misc/Validation.php");
				
		// Object Classses
		require_once("ObjectClasses/XhtmlBuilder.php");
		require_once("ObjectClasses/XhtmlMasterBuilder.php");
	
	// Retriving controller result(s)
	$masterController = new MasterController;
	$controllerResult = $masterController->DoControll(); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>QuickMessage - <?php echo $controllerResult->GetTitle()?></title>
			<meta http-equiv="content-type" content="text/html; charset=utf-8" />
			<link rel="icon" href="favicon.ico" type="image/vnd.microsoft.icon" />
			<link rel="stylesheet" media="screen" type="text/css" href="Style/basic.css"/>
			<?php
				echo $controllerResult->GetStyle();
			?>
	</head>
	<body>
		<div id='mainWrapper'>
			<div id='content'>
				<?php 
					echo $controllerResult->GetXhtml();
				?>	
			</div>
		</div>
	</body>
</html>